#include <iostream>
#include <cstdio>
#include <cmath>
using namespace std;

int main(){
	int x,w;
	cin>>x;
	w=floor(log10(x))+1;
	cout<<w<<endl;
	switch(w){
		case 4:
			cout<<x/1000<<endl;
		case 3:
			cout<<x/100%10<<endl;
		case 2:
			cout<<x/10%10<<endl;
		case 1:
			cout<<x%10<<endl;
	}
	
	return 0;
}
